// File generated from our OpenAPI spec by Stainless.

package com.metest.api.services.async.rest.actuator

import com.metest.api.TestServerExtension
import com.metest.api.client.okhttp.MetestOkHttpClientAsync
import com.metest.api.models.rest.actuator.metrics.MetricRetrieveByNameParams
import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.extension.ExtendWith

@ExtendWith(TestServerExtension::class)
internal class MetricServiceAsyncTest {

    @Disabled("Prism tests are disabled")
    @Test
    fun list() {
        val client =
            MetestOkHttpClientAsync.builder()
                .baseUrl(TestServerExtension.BASE_URL)
                .apiKey("My API Key")
                .build()
        val metricServiceAsync = client.rest().actuator().metrics()

        val metricsFuture = metricServiceAsync.list()

        val metrics = metricsFuture.get()
        metrics.validate()
    }

    @Disabled("Prism tests are disabled")
    @Test
    fun retrieveByName() {
        val client =
            MetestOkHttpClientAsync.builder()
                .baseUrl(TestServerExtension.BASE_URL)
                .apiKey("My API Key")
                .build()
        val metricServiceAsync = client.rest().actuator().metrics()

        val responseFuture =
            metricServiceAsync.retrieveByName(
                MetricRetrieveByNameParams.builder()
                    .requiredMetricName("requiredMetricName")
                    .tag("tag")
                    .build()
            )

        val response = responseFuture.get()
        response.validate()
    }
}
